package com.yiqi.lottery.entity.bo;

import com.suozhang.framework.entity.bo.BaseEntity;

import java.util.ArrayList;
import java.util.List;

public class BallMatchBo implements BaseEntity {
    private String date;
    private List<MatchInfo> list;
    private List<List<MatchInfo>> list1;

    /**
     * 　任选九/胜负彩
     */
    private String issue;
    private List<Match> match;
    private String stopTime;

    public String getIssue() {
        return issue;
    }

    public void setIssue(String issue) {
        this.issue = issue;
    }

    public List<Match> getMatch() {
        return match;
    }

    public void setMatch(List<Match> match) {
        this.match = match;
    }

    public String getStopTime() {
        return stopTime;
    }

    public void setStopTime(String stopTime) {
        this.stopTime = stopTime;
    }

    public List<List<MatchInfo>> getList1() {
        return list1;
    }

    public void setList1(List<List<MatchInfo>> list1) {
        this.list1 = list1;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public List<MatchInfo> getList() {
        return list;
    }

    public void setList(List<MatchInfo> list) {
        this.list = list;
    }

    public static class Match implements BaseEntity {

        private boolean[] isCheck;
        private boolean isDan;

        private String DReserved1;
        private String DReserved2;
        private String DReserved3;
        private String analyseUrl;
        private String guestName;
        private String guestTeamId;
        private String hostName;
        private String hostTeamId;
        private String leagueName;
        private String licenseId;
        private String notAllowBetTypes;
        private String oddUrl;
        private String parnetEventId;
        private String prevsetCountfs;
        private String raceId;
        private String reserved1;
        private String reserved2;
        private String reserved3;
        private String reserved4;
        private String reserved5;
        private String reserved6;
        private String reserved7;
        private String reserved8;
        private String startDate;
        private String state;
        private String stopDate;

        public boolean isDan() {
            return isDan;
        }

        public void setDan(boolean dan) {
            isDan = dan;
        }

        public boolean isCheck(int index) {
            return isCheck[index];
        }

        public boolean[] getIsCheck() {
            return isCheck;
        }

        public void setIsCheck(boolean[] isCheck) {
            this.isCheck = isCheck;
        }

        public void resetChecks() {
            if (isCheck != null) {
                for (int i = 0; i < isCheck.length; ++i) {
                    isCheck[i] = false;
                }
            }
        }

        public boolean isHadChecked() {
            if (isCheck == null) {
                return false;
            }
            for (int i = 0; i < isCheck.length; ++i) {
                if (isCheck[i]) {
                    return true;
                }
            }
            return false;
        }

        public int getCheckedNum() {
            if (isCheck == null) {
                return 0;
            }
            int checkedNum = 0;
            for (int i = 0; i < isCheck.length; ++i) {
                if (isCheck[i]) {
                    ++checkedNum;
                }
            }
            return checkedNum;
        }

        public double getCheckedMaxPeilv() {
            if (isCheck == null) {
                return 0.0;
            }
            double maxPeilv = 0.0;
            double peilv;
            String[] peilvs = reserved1.split("-");
            for (int i = 0; i < isCheck.length; ++i) {
                if (isCheck[i]) {
                    peilv = Double.parseDouble(peilvs[i]);
                    if (peilv > maxPeilv) {
                        maxPeilv = peilv;
                    }
                }
            }
            return maxPeilv;
        }

        public double getCheckedMinPeilv() {
            if (isCheck == null) {
                return 0.0;
            }
            double minPeilv = -1;
            double peilv;
            String[] peilvs = reserved1.split("-");
            for (int i = 0; i < isCheck.length; ++i) {
                if (isCheck[i]) {
                    peilv = Double.parseDouble(peilvs[i]);
                    if (minPeilv < 0 || peilv < minPeilv) {
                        minPeilv = peilv;
                    }
                }
            }
            if (minPeilv < 0.0) {
                minPeilv = 0.0;
            }
            return minPeilv;
        }

        public void setCheck(int index, boolean check) {
            isCheck[index] = check;
        }

        public String getDReserved1() {
            return DReserved1;
        }

        public void setDReserved1(String DReserved1) {
            this.DReserved1 = DReserved1;
        }

        public String getDReserved2() {
            return DReserved2;
        }

        public void setDReserved2(String DReserved2) {
            this.DReserved2 = DReserved2;
        }

        public String getDReserved3() {
            return DReserved3;
        }

        public void setDReserved3(String DReserved3) {
            this.DReserved3 = DReserved3;
        }

        public String getAnalyseUrl() {
            return analyseUrl;
        }

        public void setAnalyseUrl(String analyseUrl) {
            this.analyseUrl = analyseUrl;
        }

        public String getGuestName() {
            return guestName;
        }

        public void setGuestName(String guestName) {
            this.guestName = guestName;
        }

        public String getGuestTeamId() {
            return guestTeamId;
        }

        public void setGuestTeamId(String guestTeamId) {
            this.guestTeamId = guestTeamId;
        }

        public String getHostName() {
            return hostName;
        }

        public void setHostName(String hostName) {
            this.hostName = hostName;
        }

        public String getHostTeamId() {
            return hostTeamId;
        }

        public void setHostTeamId(String hostTeamId) {
            this.hostTeamId = hostTeamId;
        }

        public String getLeagueName() {
            return leagueName;
        }

        public void setLeagueName(String leagueName) {
            this.leagueName = leagueName;
        }

        public String getLicenseId() {
            return licenseId;
        }

        public void setLicenseId(String licenseId) {
            this.licenseId = licenseId;
        }

        public String getNotAllowBetTypes() {
            return notAllowBetTypes;
        }

        public void setNotAllowBetTypes(String notAllowBetTypes) {
            this.notAllowBetTypes = notAllowBetTypes;
        }

        public String getOddUrl() {
            return oddUrl;
        }

        public void setOddUrl(String oddUrl) {
            this.oddUrl = oddUrl;
        }

        public String getParnetEventId() {
            return parnetEventId;
        }

        public void setParnetEventId(String parnetEventId) {
            this.parnetEventId = parnetEventId;
        }

        public String getPrevsetCountfs() {
            return prevsetCountfs;
        }

        public void setPrevsetCountfs(String prevsetCountfs) {
            this.prevsetCountfs = prevsetCountfs;
        }

        public String getRaceId() {
            return raceId;
        }

        public void setRaceId(String raceId) {
            this.raceId = raceId;
        }

        public String getReserved1() {
            return reserved1;
        }

        public void setReserved1(String reserved1) {
            this.reserved1 = reserved1;
        }

        public String getReserved2() {
            return reserved2;
        }

        public void setReserved2(String reserved2) {
            this.reserved2 = reserved2;
        }

        public String getReserved3() {
            return reserved3;
        }

        public void setReserved3(String reserved3) {
            this.reserved3 = reserved3;
        }

        public String getReserved4() {
            return reserved4;
        }

        public void setReserved4(String reserved4) {
            this.reserved4 = reserved4;
        }

        public String getReserved5() {
            return reserved5;
        }

        public void setReserved5(String reserved5) {
            this.reserved5 = reserved5;
        }

        public String getReserved6() {
            return reserved6;
        }

        public void setReserved6(String reserved6) {
            this.reserved6 = reserved6;
        }

        public String getReserved7() {
            return reserved7;
        }

        public void setReserved7(String reserved7) {
            this.reserved7 = reserved7;
        }

        public String getReserved8() {
            return reserved8;
        }

        public void setReserved8(String reserved8) {
            this.reserved8 = reserved8;
        }

        public String getStartDate() {
            return startDate;
        }

        public void setStartDate(String startDate) {
            this.startDate = startDate;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        public String getStopDate() {
            return stopDate;
        }

        public void setStopDate(String stopDate) {
            this.stopDate = stopDate;
        }
    }


    public static class MatchInfo implements BaseEntity {

        private boolean[] isCheck;
        private boolean[] isTempCheck;
        private boolean isDan;

        private MatchInfo play;
        private String type;

        private String ahs;
        private String aid;
        private String an;
        private String an2;
        private String as;
        private String bgColor;
        private String dt;
        private String gameType;
        private String hand;
        private String hand2;
        private String hhs;
        private String hid;
        private String hn;
        private String hn2;
        private String hostOdds;
        private String hs;
        private String ht;
        private String id;
        private String isPause;
        private String isStop;
        private String issue;
        private String levelId;
        private String levelName;
        private String lid;
        private String ln;
        private String ln2;
        private String no;
        private String ot;
        private String result;
        private String resultConfirmed;
        private String roundNum;
        private String saleCloseTime;
        private String sid;
        private String sp;
        private ArrayList<String> spTypeDg;
        private ArrayList<String> spTypeGg;
        private String st;
        private String updateTime;
        private String visitOdds;
        private String vsOdds;

        public boolean isDan() {
            return isDan;
        }

        public void setDan(boolean dan) {
            isDan = dan;
        }

        public boolean[] getIsCheck() {
            return isCheck;
        }

        public void setIsCheck(boolean[] isCheck) {
            this.isCheck = isCheck;
        }

        public boolean[] getIsTempCheck() {
            return isTempCheck;
        }

        public void setIsTempCheck(boolean[] isTempCheck) {
            this.isTempCheck = isTempCheck;
        }

        public boolean isCheck(int index) {
            return isCheck[index];
        }

        public void resetChecks() {
            if (isCheck != null) {
                for (int i = 0; i < isCheck.length; ++i) {
                    isCheck[i] = false;
                }
            }
        }

        public boolean isHadChecked() {
            if (isCheck == null) {
                return false;
            }
            for (int i = 0; i < isCheck.length; ++i) {
                if (isCheck[i]) {
                    return true;
                }
            }
            return false;
        }

        public boolean isDanguan() {
            if (play == null) {
                return gameType.equals("dg");
            } else {
                return play.getGameType().equals("dg");
            }
        }

        public int getCheckedNum() {
            if (isCheck == null) {
                return 0;
            }
            int checkedNum = 0;
            for (int i = 0; i < isCheck.length; ++i) {
                if (isCheck[i]) {
                    ++checkedNum;
                }
            }
            return checkedNum;
        }

        public double getCheckedMaxPeilv() {
            if (isCheck == null) {
                return 0.0;
            }
            double maxPeilv = 0.0;
            double peilv;
            for (int i = 0; i < isCheck.length; ++i) {
                if (isCheck[i]) {
                    peilv = Double.parseDouble(spTypeGg.get(i));
                    if (peilv > maxPeilv) {
                        maxPeilv = peilv;
                    }
                }
            }
            return maxPeilv;
        }

        public double getCheckedMinPeilv() {
            if (isCheck == null) {
                return 0.0;
            }
            double minPeilv = -1;
            double peilv;
            for (int i = 0; i < isCheck.length; ++i) {
                if (isCheck[i]) {
                    peilv = Double.parseDouble(spTypeGg.get(i));
                    if (minPeilv < 0 || peilv < minPeilv) {
                        minPeilv = peilv;
                    }
                }
            }
            if (minPeilv < 0.0) {
                minPeilv = 0.0;
            }
            return minPeilv;
        }

        public void setCheck(int index, boolean check) {
            isCheck[index] = check;
        }

        public boolean isTempCheck(int index) {
            return isTempCheck[index];
        }

        public void setTempCheck(int index, boolean tempCheck) {
            isTempCheck[index] = tempCheck;
        }

        public MatchInfo getPlay() {
            return play;
        }

        public void setPlay(MatchInfo play) {
            this.play = play;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getAhs() {
            return ahs;
        }

        public void setAhs(String ahs) {
            this.ahs = ahs;
        }

        public String getAid() {
            return aid;
        }

        public void setAid(String aid) {
            this.aid = aid;
        }

        public String getAn() {
            return an;
        }

        public void setAn(String an) {
            this.an = an;
        }

        public String getAn2() {
            return an2;
        }

        public void setAn2(String an2) {
            this.an2 = an2;
        }

        public String getAs() {
            return as;
        }

        public void setAs(String as) {
            this.as = as;
        }

        public String getBgColor() {
            return bgColor;
        }

        public void setBgColor(String bgColor) {
            this.bgColor = bgColor;
        }

        public String getDt() {
            return dt;
        }

        public void setDt(String dt) {
            this.dt = dt;
        }

        public String getGameType() {
            return gameType;
        }

        public void setGameType(String gameType) {
            this.gameType = gameType;
        }

        public String getHand() {
            return hand;
        }

        public void setHand(String hand) {
            this.hand = hand;
        }

        public String getHand2() {
            return hand2 == null ? "" : hand2;
        }

        public void setHand2(String hand2) {
            this.hand2 = hand2;
        }

        public String getHhs() {
            return hhs;
        }

        public void setHhs(String hhs) {
            this.hhs = hhs;
        }

        public String getHid() {
            return hid;
        }

        public void setHid(String hid) {
            this.hid = hid;
        }

        public String getHn() {
            return hn;
        }

        public void setHn(String hn) {
            this.hn = hn;
        }

        public String getHn2() {
            return hn2;
        }

        public void setHn2(String hn2) {
            this.hn2 = hn2;
        }

        public String getHostOdds() {
            return hostOdds;
        }

        public void setHostOdds(String hostOdds) {
            this.hostOdds = hostOdds;
        }

        public String getHs() {
            return hs;
        }

        public void setHs(String hs) {
            this.hs = hs;
        }

        public String getHt() {
            return ht;
        }

        public void setHt(String ht) {
            this.ht = ht;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getIsPause() {
            return isPause;
        }

        public void setIsPause(String isPause) {
            this.isPause = isPause;
        }

        public String getIsStop() {
            return isStop;
        }

        public void setIsStop(String isStop) {
            this.isStop = isStop;
        }

        public String getIssue() {
            return issue;
        }

        public void setIssue(String issue) {
            this.issue = issue;
        }

        public String getLevelId() {
            return levelId;
        }

        public void setLevelId(String levelId) {
            this.levelId = levelId;
        }

        public String getLevelName() {
            return levelName;
        }

        public void setLevelName(String levelName) {
            this.levelName = levelName;
        }

        public String getLid() {
            return lid;
        }

        public void setLid(String lid) {
            this.lid = lid;
        }

        public String getLn() {
            return ln;
        }

        public void setLn(String ln) {
            this.ln = ln;
        }

        public String getLn2() {
            return ln2;
        }

        public void setLn2(String ln2) {
            this.ln2 = ln2;
        }

        public String getNo() {
            return no;
        }

        public void setNo(String no) {
            this.no = no;
        }

        public String getOt() {
            return ot;
        }

        public void setOt(String ot) {
            this.ot = ot;
        }

        public String getResult() {
            return result;
        }

        public void setResult(String result) {
            this.result = result;
        }

        public String getResultConfirmed() {
            return resultConfirmed;
        }

        public void setResultConfirmed(String resultConfirmed) {
            this.resultConfirmed = resultConfirmed;
        }

        public String getRoundNum() {
            return roundNum;
        }

        public void setRoundNum(String roundNum) {
            this.roundNum = roundNum;
        }

        public String getSaleCloseTime() {
            return saleCloseTime;
        }

        public void setSaleCloseTime(String saleCloseTime) {
            this.saleCloseTime = saleCloseTime;
        }

        public String getSid() {
            return sid;
        }

        public void setSid(String sid) {
            this.sid = sid;
        }

        public String getSp() {
            return sp;
        }

        public void setSp(String sp) {
            this.sp = sp;
        }

        public ArrayList<String> getSpTypeDg() {
            return spTypeDg;
        }

        public void setSpTypeDg(ArrayList<String> spTypeDg) {
            this.spTypeDg = spTypeDg;
        }

        public ArrayList<String> getSpTypeGg() {
            return spTypeGg;
        }

        public void setSpTypeGg(ArrayList<String> spTypeGg) {
            this.spTypeGg = spTypeGg;
        }

        public String getSt() {
            return st;
        }

        public void setSt(String st) {
            this.st = st;
        }

        public String getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(String updateTime) {
            this.updateTime = updateTime;
        }

        public String getVisitOdds() {
            return visitOdds;
        }

        public void setVisitOdds(String visitOdds) {
            this.visitOdds = visitOdds;
        }

        public String getVsOdds() {
            return vsOdds;
        }

        public void setVsOdds(String vsOdds) {
            this.vsOdds = vsOdds;
        }
    }

}
